package com.yanqu.road.server.cmd.group.rank;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.rank.RankProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = Protocol.C_GET_BEAUTY_RANK_DETAIL_INFO, desc = "获取美女榜单美女详细信息")
public class GetCrossBeautyRankDetailInfoCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        RankProto.GetBeautyRankDetailInfoReqMsg reqMsg = RankProto.GetBeautyRankDetailInfoReqMsg.parseFrom(packet.getBytes());
        RankProto.GetBeautyRankDetailInfoCrossReqMsg.Builder respMsg = RankProto.GetBeautyRankDetailInfoCrossReqMsg.newBuilder();
        respMsg.setFromServerId(serverId);
        respMsg.setFromUserId(packet.getPlayerId());
        respMsg.setReqMsg(reqMsg.toBuilder());
        YanQuMessage message = YanQuMessageUtils.buildMessage(Protocol.S_GET_BEAUTY_RANK_DETAIL_INFO_FROM_CROSS, respMsg);
        MessageHelper.sendPacket(reqMsg.getServerId(), 0, message);
    }

    @Override
    public void sendData() {

    }
}
